package com.jack.student;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class AddInfo {
    //一个存储学生信息的list集合
    public static List<StudentInfo> students = new ArrayList();

    public static void addInfo(){
        Scanner scanner = new Scanner(System.in);
        StudentInfo stu = new StudentInfo();
        System.out.println("请输入你要添加学生的学号:");
        stu.setStuId(scanner.nextLong());

        System.out.println("请输入你要添加学生的名字:");
        stu.setStuName(scanner.next());
        System.out.println("请输入你要添加学生的年龄:");
        stu.setAge(scanner.nextInt());
        System.out.println("请输入你要添加学生的性别:");
        stu.setSex(scanner.next());
        System.out.println("请输入你要添加学生的手机号:");
        stu.setIphoneNum(scanner.next());
        System.out.println("请输入你要添加学生的班级:");
        stu.setClassRoom(scanner.next());

        students.add(stu);
    }
}
